"use strict";
cc._RF.push(module, 'bea43tsbPtLE5yI98qkWas/', 'gameStorage');
// Script/SdkTools/gameStorage.ts

"use strict";
/**
 * 游戏存档 和storage一样 存储数据
 */
Object.defineProperty(exports, "__esModule", { value: true });
var gameStorage = /** @class */ (function () {
    function gameStorage() {
    }
    /**
     * 音乐
     * @param t
     */
    gameStorage.setMusic = function (t) {
        cc.sys.localStorage.setItem("music", t);
    };
    gameStorage.getMusic = function () {
        var t = cc.sys.localStorage.getItem("music");
        return t = t || 0, Number(t);
    };
    /**
     * 音效
     * @param t
     */
    gameStorage.setSound = function (t) {
        cc.sys.localStorage.setItem("sound", t);
    };
    gameStorage.getSound = function () {
        var t = cc.sys.localStorage.getItem("sound");
        return t = t || 0, Number(t);
    };
    /**
     * 离线时间
     */
    gameStorage.setoffLineTime = function () {
        var _time = new Date().getTime();
        cc.sys.localStorage.setItem('logintime', _time);
    };
    gameStorage.getoffLineTime = function () {
        var t = cc.sys.localStorage.getItem('logintime');
        return t = t || 0, Number(t);
    };
    gameStorage.setzhendong = function (t) {
        cc.sys.localStorage.setItem("zhendong", t);
    };
    gameStorage.getzhendong = function () {
        var t = cc.sys.localStorage.getItem("zhendong");
        if (t) {
            t = Number(t);
        }
        else {
            t = 0;
            this.setzhendong(t);
        }
        return t;
    };
    return gameStorage;
}());
exports.default = gameStorage;

cc._RF.pop();